import { Connection } from 'mongoose';
import { DBCONSTANTS } from '../../database/db.constants';
import { TeamSchema } from './team.schema';

export const teamProviders = [
  {
    provide: DBCONSTANTS.teamModel,
    useFactory: (connection: Connection) =>
      connection.model('Team', TeamSchema),
    inject: [DBCONSTANTS.databaseConnection]
  }
];
